using System;
using System.Data;
using System.IO;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.EnterpriseServices;
using System.Net.Mail;
using IGlobalist.Cms.Common;

namespace IGlobalist.Cms
{
    public partial class __uploadFile : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string content = Request["content"];
            Session["content"] = content;
        }

        protected void btnAttach_Click(object sender, EventArgs e)
        {
            string path = HttpContext.Current.Server.MapPath(FolderUserProfileVirtualPath);
            HttpPostedFile fPost = fupload.PostedFile;
            string idimg=  Convert.ToString(IGlobalistMembership.GetUser().ID);
            //string fExtention = Path.GetExtension(fPost.FileName);
            string fName = idimg + ".jpg";

            fPost.SaveAs(Path.Combine(path, fName));
            lblScript.Text = "<script>window.close();window.opener.location.reload();</script>";
        }

    }
}
